package biz.obake.team.touchprotector.ui;

import android.os.Bundle;
import android.widget.SeekBar;
import android.widget.TextView;
import androidx.appcompat.app.c;
import biz.obake.team.touchprotector.R;

public class VibrationLengthActivity extends c {
    private TextView t;
    private SeekBar u;

    class a implements SeekBar.OnSeekBarChangeListener {
        a() {
        }

        public void onProgressChanged(SeekBar seekBar, int i, boolean z) {
            biz.obake.team.touchprotector.g.a.r("vibrate_length", biz.obake.team.touchprotector.c.c(R.array.vibrate_length_values, i));
            VibrationLengthActivity.this.G();
        }

        public void onStartTrackingTouch(SeekBar seekBar) {
        }

        public void onStopTrackingTouch(SeekBar seekBar) {
        }
    }

    /* access modifiers changed from: protected */
    public void G() {
        int a2 = biz.obake.team.touchprotector.c.a(R.array.vibrate_length_values, biz.obake.team.touchprotector.g.a.l("vibrate_length"));
        String c2 = biz.obake.team.touchprotector.c.c(R.array.vibrate_length_entries, a2);
        this.u.setProgress(a2);
        this.t.setText(c2);
    }

    /* access modifiers changed from: protected */
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView((int) R.layout.vibration_length_activity);
        this.t = (TextView) findViewById(R.id.lengthText);
        SeekBar seekBar = (SeekBar) findViewById(R.id.lengthBar);
        this.u = seekBar;
        seekBar.setMax(biz.obake.team.touchprotector.c.b(R.array.vibrate_length_values) - 1);
    }

    /* access modifiers changed from: protected */
    public void onPause() {
        super.onPause();
        this.u.setOnSeekBarChangeListener((SeekBar.OnSeekBarChangeListener) null);
    }

    /* access modifiers changed from: protected */
    public void onResume() {
        super.onResume();
        this.u.setOnSeekBarChangeListener(new a());
        G();
    }
}
